<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateSOrderInfosTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('s_order_info', function (Blueprint $table) {
            $table->increments('id');

            $table->integer('user_id')->comment("用户id")->index();
            $table->integer('info_id')->comment("内容id")->index();
            $table->integer('info_type')->comment("内容类型")->defalut(1);
            $table->integer('get_type')->comment("购买类型")->defalut(1);

            $table->integer('pay_price')->comment("实际支付金额,单位分");
            $table->integer('pay_type')->comment("支付类型");

            $table->integer('actual_price')->comment("实际价格，单位分");

            $table->integer('voucher_id')->comment("抵扣券id");

        
            $table->integer('lesson_type_id')->comment("课程类型id")->index();
            $table->integer('lesson_num')->comment("课时");
            $table->dateTime('pay_time')->comment("支付时间");

            $table->timestamps();
            $table->SoftDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
    }
}
